Any browser that encounter the text www.domain.com or http://domain.com/etc/ in a text section of some html will automatically translate it into <a... moreAny browser that encounter the text www.domain.com or http://domain.com/etc/ in a text section of some html will automatically translate it into <a href="http://www.domain.com">www.domain.com</a> or <a href="http://domain.com/etc/">http://domain.com/etc/</a> tag. I have to clean-up and verify some texts like this and do this replacement automatically, but the problem is that i can't insert new tags into an element's string.
#!/usr/bin/python
# -*- coding: utf8
import re
from bs4 import BeautifulSoup as bs